package cn.detu.baking.mapper;

import cn.detu.baking.pojo.entity.Content;
import cn.detu.baking.pojo.vo.*;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Date:2024/2/23
 * Author：
 * Description:
 */
@Repository
public interface ContentMapper {
    int insert(Content content);

    List<ContentManagementVO> selectByType(Integer type, Long id);

    ContentEditVO selectByIdForEdit(Long id);

    void update(Content content);

    void deleteById(Long id);

    List<ContentIndexVO> selectByTypeAndCategoryId(Integer type, Long categoryId);

    List<ContentIndexVO> selectByTypeForList(Integer type);

    ContentDetailVO selectByIdForDetail(Long id);

    List<ContentSimpleVO> selectOthersByUserId(Long userId);

    void updateViewCountById(Long id);

    List<ContentSimpleVO> selectHot();

    List<ContentIndexVO> selectByWd(String wd);

    List<ContentAdminVO> selectByTypeForAdmin(Integer type);

    void updateCommentCount(Long contentId);
}
